package com.fenghongzhang.a1811;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.Toast;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;

@Route(path = "/main/main2")
public class Main2Activity extends AppCompatActivity {


    @Autowired
    String key;
    @Autowired
    int age;

    @Autowired
    User user;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);

        //第三次
        //Arouter
        ARouter.getInstance().inject(this);

        Toast.makeText(this, user.toString(), Toast.LENGTH_SHORT).show();


    }
}
